<template>
  <div class="search">
    <form action="/">
      <van-search
        v-model="searchValue"
        placeholder="请输入搜索关键词"
        show-action
        ref="input"
        @search="onSearch"
        @cancel="onCancel"
      />
    </form>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      searchValue: "",
    };
  },
  methods: {
      onCancel(){
          this.$router.push('/');
      },

      onSearch(){
          
      }
  },
  mounted() {
    this.$nextTick(() => {
      this.$refs.input.focus();
    });
  },

  created() {
   
  },
};
</script>

<style scoped>
/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  list-style: none;
}
</style>
